#coding=utf-8
import sys

from PyQt5.QtCore import QObject
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
# engine.load('./main.qml')
engine.load('qml-test.qml')
# 根对象
root_obj = engine.rootObjects()[0]
root_obj.show()
# Text对象
#txt_obj = engine.rootObjects()[0].findChild(QObject, "txt")
# 读取属性值
#txt_value = txt_obj.property("text")
# 设置属性值
#txt_obj.setProperty("text", "Clicked!")
app.exec_()

